﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using API_test.BLL;
using API_test.Model;
namespace API_test.Web.Page.login
{
    /// <summary>
    /// login 的摘要说明
    /// </summary>
    public class login : IHttpHandler
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="context"></param>
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType="text/html";
            string account=context.Request.Form["account"];
            string password = context.Request.Form["password"];            
            UserInfo user = new UserInfo();
            user.UserName = account;
            user.PassWord = password;
            CustomerBLL customerBLL = new CustomerBLL();
            int result=customerBLL.Login(user);
            context.Response.Write(result);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}